using System;
using System.Collections;
using System.Collections.Generic;

using adt.tree;
using adt.tree.search;



namespace Sindarin.Fundament
{
	
	class MainClass
	{
		public static void Main (string[] args)
		{
			var t = (new BuildTree<int> { 9, '{', 7, 4, '{', 5, '}', '}' }).Tree;
			var p = (new BuildTree<int> { 9, '{', -1, -12, '}' }).Tree;
			
			
			Console.WriteLine(t);
			
			var pat = new TreeTopPattern<int>(p, FOOLISH_ZERO);
			Console.WriteLine(pat.Match(t));
		}
		
		public static WildcardPredicates<int> FOOLISH_ZERO =
			new WildcardPredicates<int>() { IsWildNode = (x) => (x<0 && x>-10),
											IsWildSubtree = (x) => (x <= -10) };
	}
}

